#include <stdio.h>
#include <string.h>

struct student
{
	char sno[8];
	char name[20];
	char sex;
	int age;
	double score;
};

int main(void)
{
	struct student s;
	struct student *p;

	strcpy(s.sno, "2015001");
	strcpy(s.name, "LiMing");
	s.sex = 'M';
	s.age = 18;
	s.score = 92.5;
	puts("s.sno\t\ts.name\t\ts.sex\t\ts.age\t\ts.score");
	printf("%s\t\t%s\t\t%c\t\t%d\t\t%.1f\n\n", s.sno, s.name, s.sex, s.age, s.score);
	p = &s;
	puts("(*p).sno\t(*p).name\t(*p).sex\t(*p).age\t(*p).score");
	printf("%s\t\t%s\t\t%c\t\t%d\t\t%.1f\n\n", (*p).sno, (*p).name, (*p).sex, (*p).age, (*p).score);
	puts("p->sno\t\tp->name\t\tp->sex\t\tp->age\t\tp->score");
	printf("%s\t\t%s\t\t%c\t\t%d\t\t%.1f\n", p->sno, p->name, p->sex, p->age, p->score);

	return 0;
}